﻿#region Using Statements
using DirectZZT.Shared.Core;
using DirectZZT.Shared.World;
using DirectZZT.Shared.World.Objects;
#endregion

namespace DirectZZT.BoardObjects
{
    /// <summary>
    /// Represents the scroll ("Scroll") board object.
    /// </summary>
    [Export("Scroll")]
    [BoardObject(Identifier = "Scroll", Classification = BoardObjectClassification.Item, AllowBecome = false)]
    public sealed class ScrollBoardObject : BoardObject, IItemBoardObject
    {
        #region Constructors

        /// <summary>
        /// Initializes a new instance of the ScrollBoardObject class.
        /// </summary>
        public ScrollBoardObject()
        {
            this.Texture = "Textures/PlayfieldObjects/Scroll";
            this.Enabled = true;
            this.Visible = true;
        }

        #endregion

        #region Methods

        /// <summary>
        /// Only DirectZZT supported.
        /// </summary>
        /// <param name="featureSet"></param>
        /// <returns></returns>
        protected override bool CanAttachScript(FeatureSet featureSet)
        {
            return featureSet == FeatureSet.DirectZZT;
        }

        #endregion

        #region IItemBoardObject Members

        bool IItemBoardObject.CanPickup(BoardObject obj)
        {
            // only a player can pick us up
            return obj is PlayerBoardObject;
        }

        void IItemBoardObject.OnPickup(BoardObject obj)
        {
            PlayerBoardObject player = (PlayerBoardObject)obj;
            // scroll displays some text i guess??

        }

        #endregion
    }
}
